package cc.fs.zhihuapp.utils;
import android.util.Log;

import java.io.File;
import java.util.List;

import jcifs.smb.SmbFile;

/**
 * Created by fostion on 2015/11/20.
 */
public class SmbUtil {

    private final String TAG = "--SmbUtil--";
    private SmbFile smbFile;

    public void e(String msg){
        Log.e(TAG, msg);
    }

    public SmbUtil(){
    }

    public void  getFiles(String ip,String account,String password){
        try {
            smbFile = new SmbFile("smb://admin:123456@192.168.1.101/");
            if(smbFile != null){
                SmbFile[] fileList = smbFile.listFiles();
                for(int i=0;i<fileList.length;i++){
                    Log.e("----  "," "+fileList[i].getName());
                }
                e("连接服务器成功  "+fileList.length);
            }else{
                e("连接服务器失败");
            }
        } catch (Exception e) {
            e.printStackTrace();
        }

    }



}
